/**
 * Copyright (c) 2016-2019 九点科技 All rights reserved.
 *
 * http://www.9dyun.cn
 *
 * 版权所有，侵权必究！
 */
package com.dian.modules.base.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.dian.common.validator.group.AddGroup;
import com.dian.common.validator.group.UpdateGroup;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.dian.common.entity.BaseEntity;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
 * 业务数据字典
 *
 * @author xiaolai
 * @email xiaolai@9dyun.cn
 * @date 2019-06-28 15:16:48
 */
@Data
@TableName("base_dist")
public class DistEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

        /**
        * 数据字典父id
        */
        @NotNull(message="数据字典父id不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Long parentId;



        /**
        * 数据字典编码
        */
        @NotBlank(message="数据字典编码不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=30,  groups ={AddGroup.class, UpdateGroup.class}, message="数据字典编码      长度不能超过30个字符")
        private String distCode;



        /**
        * 数据字典名称
        */
        @NotBlank(message="数据字典名称不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=30,  groups ={AddGroup.class, UpdateGroup.class}, message="数据字典名称      长度不能超过30个字符")
        private String distName;

        /**
        * 数据字典序号
        */
        private Integer confSeq;



        /**
        * 数据字典key
        */
        @Length(max=50,  groups ={AddGroup.class, UpdateGroup.class}, message="数据字典ke长度不能超过50个字符")
        private String confKey;



        /**
        * 数据字典value
        */
        @Length(max=100,  groups ={AddGroup.class, UpdateGroup.class}, message="数据字典value长度不能超过100个字符")
        private String confValue;



        /**
        * 是否系统字典:0-否-NO;1-是-YES
        */
        @NotNull(message="是否系统字典不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Integer isSystem;



        /**
        * 是否有效:0-禁用-DISABLE;1-启用-NORMAL
        */
        @NotNull(message="是否有效不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Integer isValid;



        /**
         * 字典明细
         */
        @TableField(exist = false)
        private List<DistEntity> distLineData;


}
